1. Field of the Invention
The present invention relates to methods for minimizing distortions caused by aliasing in computer-generated graphic display systems that employ cathode ray tube displays.
2. Background of the Invention
Cathode ray tube (CRT) display devices operate by scanning an electron beam rapidly back and forth across a screen to illuminate discrete picture-element locations, or "pixels", along the horizontal scan lines. The horizontal scan lines are organized by synchronizing signals, with each frame containing a fixed number (e.g., 525) of visible horizontal scan lines and retrace lines. The net effect of a complete series of scans is to produce a snapshot-like "frame" that contains video data as to the state of each pixel location on each scan line. (FIG. 1A shows, for example, a 5.times.11 pixel grid that comprises a small portion of a complete frame of video information.) The frames are reproduced at a standard rate (e.g., sixty frames per second).
In practice, it is not possible to draw a perfectly continuous curve with a CRT device. As an example, FIG. 1A shows a continuous non-horizontal curve 10 which is not aligned with either the columns or rows of pixels in the grid. When such a curve is approximated on a CRT screen, discontinuities or "jaggies" can be observed along the curve. This phenomena--which is known as aliasing--is shown in FIG. 1B where the curve 10 is approximated as a series of staircase-like structures.
Various anti-aliasing technique have been suggested. For example, as shown in FIG. 1C, selected pixels can be only partially illuminated so that a jagged curve can be made to look smooth to the human eye. In this example, a starting pixel 12A is fully illuminated because the curve 10 is exactly aligned with the starting pixel 12A. The curve 10 then goes between other pixels 12B and 12C but not in exact alignment with the center of either of the other pixels 12B or 12C. The distances from the curve 10 to the centers of other pixels 12B and 12C equal 2/8 grid units and 6/8 grid units, respectively, in FIG. 1C. Therefore, pixel 12B and 12C are illuminated to an intensity of 75 percent (6/8) and 25 percent (2/8), respectively, of their full scale intensity. Similarly, the distances from the curve 10 to the centers of still other pixels 12D and 12E are both 4/8 grid units and consequently these pixels 12D and 12E are both illuminated at 50 percent of their full scale intensity. In this way, the anti-aliasing technique blurs the edges of the curve 10 to obtain smooth edge graphics. The above distances are selected to be even fractions of grid units for convenience of illustration but likely involve less convenient numbers.
When employing a color CRT display, conventional anti-aliasing technique becomes even more complicated. As shown in FIG. 2A, if a curve 20 with color A is drawn on a background of color B without anti-aliasing, the pixels 22 are assigned either color A (the curve color) or color B (the background color). Because of the discreet nature of the color pixels 22 on the screen, jaggies are inevitable on typical CRT screens. Using an anti-aliasing technique, as shown in FIG. 2B, the pixels surrounding the curve 20 are assigned color values A.sub.1, A.sub.2, . . . etc. These color intensities A.sub.1, A.sub.2, . . . etc. are a mix of the curve color A with background color B according to the equation: EQU A.sub.i =(1-p.sub.i)*A+p.sub.i *B
where p.sub.i is the mix ratio determined by the distance between a pixel center and the curve 20 with the mixed colors, the curve 20 looks smooth to a human eye.
In the prior art, the basic technique to implement anti-aliasing involves finding distances between pixel centers and a curve and then using the distances for determining mix ratios. Some more sophisticated techniques involve finding the overlap area of a curve with certain width and a pixel area and then using the overlap area for determining mix ratios. Most anti-aliasing methods use floating point arithmetics to find the distance, but such operations have several drawbacks. For example, such operations usually require expensive math co-processors and other specialized circuitry.